home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / mig / dist / Makefile < prev    next >
Encoding:
Makefile  |  1992-04-09  |  2.7 KB  |  114 lines

  1. #
  2. # Mach Operating System
  3. # Copyright (c) 1991,1990 Carnegie Mellon University
  4. # All Rights Reserved.
  5. # Permission to use, copy, modify and distribute this software and its
  6. # documentation is hereby granted, provided that both the copyright
  7. # notice and this permission notice appear in all copies of the
  8. # software, derivative works or modified versions, and any portions
  9. # thereof, and that both notices appear in supporting documentation.
  10. # CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS 
  11. # CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  12. # ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  13. # Carnegie Mellon requests users of this software to return to
  14. #  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
  15. #  School of Computer Science
  16. #  Carnegie Mellon University
  17. #  Pittsburgh PA 15213-3890
  18. # any improvements or extensions that they make and grant Carnegie the
  19. # rights to redistribute these changes.
  20. #
  21. #
  22. # HISTORY
  23. # $Log:    Makefile,v $
  24. # Revision 2.11  92/04/08  23:19:47  rpd
  25. #     Removed obsolete sun3 and mac2 compiler options.
  26. #     [92/03/23            rpd]
  27. #     Added cross-compilation support.
  28. #     [92/03/18            jvh]
  29. # Revision 2.10  92/03/05  22:46:17  rpd
  30. #     Changed to use double-colon rules for top-level targets.
  31. #     [92/02/28            rpd]
  32. # Revision 2.9  92/01/23  15:21:21  rpd
  33. #     Revised for new Makefile organization.
  34. #     [92/01/16            rpd]
  35.  
  36. include ${MAKETOP}Makefile-common
  37.  
  38. ITARGETS = ${HOST_INSTALLDIR}/bin/mig ${HOST_INSTALLDIR}/lib/migcom
  39. TTARGETS = ${HOST_TRELEASEDIR}/bin/mig ${HOST_TRELEASEDIR}/lib/migcom
  40.  
  41. all :: mig.sh migcom
  42.  
  43. install :: ${ITARGETS}
  44.  
  45. release :: ${TTARGETS}
  46.  
  47. clean ::
  48.     ${RM} ${ITARGETS}
  49.  
  50. # installation rules
  51.  
  52. ${HOST_INSTALLDIR}/bin/mig : mig.sh
  53.     ${RM} $@
  54.     ${CP} $? $@
  55.     ${CHMOD_BIN} $@
  56.  
  57. ${HOST_INSTALLDIR}/lib/migcom : migcom
  58.     ${RM} $@
  59.     ${CP} $? $@
  60.     ${HOST_STRIP} $@
  61.     ${CHMOD_BIN} $@
  62.  
  63. # release rules
  64.  
  65. ${HOST_TRELEASEDIR}/bin/mig : ${HOST_FRELEASEDIR}/bin/mig
  66.     ${RM} $@
  67.     ${CP} $? $@
  68.  
  69. ${HOST_TRELEASEDIR}/lib/migcom : ${HOST_FRELEASEDIR}/lib/migcom
  70.     ${RM} $@
  71.     ${CP} $? $@
  72.  
  73. # build rules
  74.  
  75. OBJS = mig.o parser.o lexxer.o error.o string.o type.o routine.o \
  76.     statement.o global.o header.o user.o server.o utils.o
  77.  
  78. PMAX_CCOPTS = -Dvoid=int
  79. CCOPTS = ${${TARGET_MACHINE}_CCOPTS}
  80.  
  81. LIBS = ${LIBL}
  82. DEPS = ${DEPL} ${DEPCRT0}
  83.  
  84. migcom : ${OBJS}
  85.     ${RM} $@ $@.out
  86.     ${USE_HOST_PATHS} ${DEPS/%/$@} \
  87.     ${HOST_CC} -o $@.out ${HOST_CFLAGS} ${OBJS} ${LIBS} && \
  88.     ${MV} $@.out $@
  89.  
  90. .c.o:
  91.     ${USE_HOST_PATHS} ${HOST_CC} -c ${HOST_CFLAGS} $*.c
  92.  
  93. lexxer.o : parser.h
  94.  
  95. parser.c parser.h : parser.y
  96.     yacc -d parser.y && \
  97.     mv y.tab.c parser.c && \
  98.     mv y.tab.h parser.h
  99.  
  100. lexxer.c : lexxer.l
  101.     lex lexxer.l && \
  102.     mv lex.yy.c lexxer.c
  103.  
  104. -include Makedep
  105.